Network Environment

  Regardless of whether the HTTP server is on the public internet or in the same local area network as the device, the device actively sends HTTP requests to the HTTP server for interaction. The following steps take the example of setting up an HTTP test server on a physical Windows machine in a LAN environment

Prerequisites

  1. Set up an HTTP test server on a Windows computer with IP 192.168.6.215 and HTTP test server port 8081;

  2. a T5AI device, ip:192.168.6.212;

Server configuration

The test server is implemented in Java and requires setting up a Java environment, taking the Windows platform as an example

Download jdk

link:Java Downloads | Oracle

Install jdk

Configure environment variables

Enter advanced system settings, shortcut key win+i ->system settings ->advanced system settings, configure JAVA_SOME in the system variable

Set the PATH variable to add the bin directory of JRE to the existing PATH environment variable

java Environmental testing

open cmd,inputjava -version,Press enter and the following image will appear, indicating successful configuration

Download Test Server

link:https://xrs-public-bucket.obs.cn-south-1.myhuaweicloud.com/Temp/http-event-server.zip

decompression

Extract the compressed file to a separate directory

Test Server Configuration File Description

parameter describe
user_secret01 Secret key,Generally, the camera's serial number is used, and the device token and key on the camera's web page use this serial number.
passengerStaticsInterval Passenger flow statistics event interval
heartBeatInterval heartbeat interval
isEnableElectronicDefence Electronic fence incident reporting switch; True - report, false - do not report
isCrossBorderDetectEnable Cross border detection event reporting switch; True - report, false - do not report
isOffDutyDetectEnable OffDuty Detect Event reporting switch; True - report, false - do not report
isPassengerFlowStaticsEnable Passenger Flow Statics Event reporting switch; True - report, false - do not report
isCryScreamDetectEnable Cry Scream Detect Event reporting switch; True - report, false - do not report
isPetDetectEnable Pet Detect Event reporting switch; True - report, false - do not report
isFallDetectEnable Fall Detect Event reporting switch; True - report, false - do not report
isSnapshotEnable Snapshot Event reporting switch; True - report, false - do not report
isPersonInfoEnable Person Info Event reporting switch; True - report, false - do not report
isPersonDetectEnable Person Detect Event reporting switch; True - report, false - do not report
isCarLicenseSnapshotEnable Car License Snapshot Event reporting switch; True - report, false - do not report
isCarDetectEnable Car DetectEvent reporting switch; True - report, false - do not report
isMotionDetectEnable Motion Detect Event reporting switch; True - report, false - do not report
isTrafficStatisticsEnable Traffic Statistics Event reporting switch; True - report, false - do not report
isTrafficStatisticsCarShapeEnable Traffic Statistics Car Shape Event reporting switch; True - report, false - do not report
checkOAuth OAuth authentication switch; True authentication, false non authentication
eventSendMode Event sending mode; RealTime - Real time sending, false - Do not report

Run the test server

Open cmd, in the directory where the test server jar package (event_server.jar) is located, execute thejava -jar event_server.jarcommand,Press enter and the following image will appear, indicating that the test server has successfully started

You can also enter the link for computer IP: 8081 in the browser, and when "Welcome to user" appears, it indicates that the server installation is complete

Explanation: When in other directories, the test server can also be run through an absolute path to executeD:\HTTPServer\event-server.jarCommand, if using relative path, will prompt the following error